const mongoose = require('./../db')
const Schema = mongoose.Schema

const order = new Schema({
    orderid: { type: String},
    proid: { type: String},
    userid: { type: String},
    time: { type: String}, // 下单时间
    status: { type: Number}, // 0 待付款 1 待发货 2 待收货 3 待评价 4 已完成 
    name: {type: String},
    tel: {type: String},
    address: {type: String}, // 省市区详细地址的完整版
    proname: {type: String},
    proimg: {type: String},
    price: {type: Number},
    num: {type: Number}
})

module.exports = mongoose.model('Order', order)